from django.shortcuts import render
from rest_framework import viewsets

from app01.filter import check_login
from article.models import Article
from article.serializers import ArticleSerializer


# Create your views here.
@check_login
def index(request):
    return render(request, 'article/index.html')

class ArticleViewSet(viewsets.ModelViewSet):
    queryset = Article.objects.all()
    serializer_class = ArticleSerializer